package com.demo.facade;

import com.demo.facade.*;

public class HomeTheaterFacade {

    TheaterLight theaterLight;
    Popcorn popcorn;
    Stereo stereo;
    Screen screen;
    Projector projector;
    DVDPlayer dvdPlayer;

    public HomeTheaterFacade() {
        this.theaterLight = TheaterLight.getTheaterLight();
        this.popcorn = Popcorn.getPopcorn();
        this.stereo = Stereo.getStereo();
        this.screen = Screen.getScreen();
        this.projector = Projector.getProjector();
        this.dvdPlayer = DVDPlayer.getDvdPlayer();
    }

    public void ready() {

        popcorn.on();
        popcorn.pop();
        screen.down();
        projector.on();
        stereo.on();
        dvdPlayer.on();
        theaterLight.dim();
    }

    public void play() {
        dvdPlayer.play();
    }

    public void pause() {
        dvdPlayer.pause();
    }

    public void end() {
        popcorn.off();
        theaterLight.bright();
        screen.up();
        projector.off();
        stereo.off();
        dvdPlayer.off();
    }


}
